package cn.jiayen.example;

import cn.jiayen.comm.generate.GenerateCodeLogic;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * Created by jiayen on 2018/5/8.
 */
@SpringBootApplication
@EnableAutoConfiguration
@EnableSwagger2
@ComponentScan(basePackages = "cn.jiayen")
public class ExampleApplication {
    public static void main(String[] args) {
        SpringApplication.run(ExampleApplication.class, args);
//        genaratorCode();
    }

    public static   void genaratorCode(){
//             <basePath>D:\gitwork\jiayen-wad\exmaple\src\main\java\</basePath>
//                    <packageName>cn.jiayen.example.bean</packageName>
        String basePath ="D:\\gitwork\\jiayen-wad\\exmaple\\src\\main\\java\\";
        String packName =  "cn.jiayen.example.bean";
        String target ="target";
        GenerateCodeLogic  generateCodeLogic = new GenerateCodeLogic(basePath,packName,target);
        generateCodeLogic.startGenerate();
    }
}
